import Vue from 'vue'
import Router from 'vue-router'
import Index from '@/components/Index'
import Web from '@/components/Web'
import Android from '../components/Android'
import Join from '../components/Join'
import Member from '../components/Members'
import People from '../components/People'
import HonoursWall from '../components/HonoursWall'
import OurActivity from '../components/OurActivity'
import LearnWay from '../components/LearnWay'
Vue.use(Router)

export default new Router({
  scrollBehavior (to, from, savedPosition) {
    // return 期望滚动到哪个的位置
    return {x: 0, y: 0}
  },
  mode: 'history',
  routes: [
    {
      path: '/',
      name: 'Index',
      component: Index
    },
    {
      path: '/web',
      name: 'web',
      component: Web
    },
    {
      path: '/android',
      name: 'android',
      component: Android
    },
    {
      path: '/join',
      name: 'join',
      component: Join
    },
    {
      path: '/members',
      name: 'members',
      component: Member
    },
    {
      path: '/people/:userId',
      name: 'people',
      component: People
    },
    {
      path: '/honourswall',
      name: 'honourswall',
      component: HonoursWall
    },
    {
      path: '/ouractivity',
      name: 'ouractivity',
      component: OurActivity
    },
    {
      path: '/learnway',
      name: 'learnway',
      component: LearnWay
    }

  ]
})
